package shark.common.model;

public class Result<T> {
    private long code;
    private String message;
    private T data;

    protected Result() {
    }

    public Result(long code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public long getCode() {
        return code;
    }

    public Result<T> setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return this.message;
    }

    public Result<T> setMsg(String msg) {
        this.message = msg;
        return this;
    }

    public T getData() {
       return data;
    }

    public Result<T> setData(T data) {
        this.data = data;
        return this;
    }
}
